package com.biz.primus.model.order.vo.response;

import com.biz.primus.model.depot.vo.DepotRespVo;
import com.biz.primus.model.order.enums.*;
import com.biz.primus.model.order.vo.OrderConsigneeInfoVO;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.List;

/**
 * 订单汇总响应视图，请求字段加统计信息
 *
 * @author Tiger Feng
 * @date 2017年10月31日
 */
@Data
@NoArgsConstructor
@ApiModel("订单汇总返回模型")
public class OrderSummaryResponseVO implements Serializable {
    private static final long serialVersionUID = -5045900378112433309L;

    @ApiModelProperty("订单汇总编号")
    private String orderSummaryCode;
    @ApiModelProperty("订单类型(FLASH:闪送、STORE:商城、SECKI:秒杀、SYNCH:同步)")
    private OrderType orderType;
    @ApiModelProperty("门店编码(门店或省仓店)")
    private String depotCode;
    @ApiModelProperty("门店信息")
    private DepotRespVo depot;
    @ApiModelProperty("用户ID")
    private Long userId;
    @ApiModelProperty("订单IP，用户下单的IP地址")
    private String orderIp;
    @ApiModelProperty("收货信息")
    private OrderConsigneeInfoVO consignee;

    @ApiModelProperty("门店订单")
    private OrderResponseVO storeOrder;
    @ApiModelProperty("总店订单、旗舰店订单")
    private OrderResponseVO flagshipOrder;
    @ApiModelProperty("当前订单汇总可支持的支付方式列表")
    private List<OrderPaymentWay> supportPaymentWays;
    @ApiModelProperty(value = "支付方式",
            notes = "\"alipay\":\"支付宝支付\",\"balance\":\"电子钱包支付\",\"wechatpay\":\"微信支付\",\"cod\":\"货到付款\",\"unionpay\":\"银联支付\"")
    private OrderPaymentWay paymentWay;

    @ApiModelProperty("促销列表")
    private List<OrderPromotionResponseVO> promotions;
    @ApiModelProperty("促销")
    private OrderPromotionResponseVO promotion;
    @ApiModelProperty(value = "参加促销标示,不传或false标示不参加促销", required = true)
    private Boolean usePromotion;
    @ApiModelProperty(value = "可以使用优惠券标示，如果促销和优惠券无法同时使用时，选择了促销，本字段返回false")
    private Boolean canUseDiscountCoupon;
    @ApiModelProperty("未支付订单过期时间")
    private Timestamp expireAt;
    @ApiModelProperty("支付状态")
    private PaymentState paymentState;

    @ApiModelProperty(value = "未支付订单保留时间(分)", hidden = true)
    @JsonIgnore
    private Integer expireMinutes;
    @ApiModelProperty(value = "商户自备注(一般用于客服)", hidden = true)
    @JsonIgnore
    private String selfRemark;

    @ApiModelProperty("用户备注")
    private String userRemark;
    @ApiModelProperty(value = "发票类型",notes = "\"personal\":\"个人\",\"company\":\"公司\",\"none\":\"不开发票\"")
    private InvoiceType invoiceType;
    @ApiModelProperty("发票类型为公司时有值空")
    private String invoiceTitle;


    @ApiModelProperty("应付款总金额")
    private Integer payableAmount;

    @ApiModelProperty("商品总数量")
    private Integer quantity;
    @ApiModelProperty("物流费用")
    private Integer deliveryMoney;
    @ApiModelProperty(value = "订单来源",notes = "\"android\":\"安卓\",\"wechat\":\"微商城\",\"ios\":\"ios\"")
    private OrderClient client;
}
